import CONSTANT from "../constant";

export default class Vec3 {
    constructor(x=0,y=0,z=0) {
        this.elements=new Float64Array(3);
        this.elements[0]=x;
        this.elements[1]=y;
        this.elements[2]=z;
        CONSTANT.VEC3_NUM_CREATIONS++;
    }
    get x(){
        return this.elements[0];
    }
    set x(num){
        this.elements[0]=num;
    }
    get y(){
        return this.elements[1];
    }
    set y(num){
        this.elements[1]=num;
    }
    get z(){
        return this.elements[2];
    }
    set z(num){
        this.elements[2]=num;
    }
}